<template>
    <div>
        <p>我的年龄是{{ $route.params.age }}</p>
        <p>我的英文名是{{ $route.params.name }}</p>
    </div>
</template>

<script>
    export default {
        name: "Page4",

        created() {
            console.log('组件Page4创建了');
        },

        beforeRouteUpdate(to, from, next) {
            console.log(to);
            console.log(from);
            console.log('组件Page4路由更新了');
            next();
        }
    }
</script>

<style scoped>

</style>